<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard - 源智库 SpringBase</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        :root {
            --primary-color: #0d6efd;
            --secondary-color: #6c757d;
            --bg-color: #f4f7fa;
            --sidebar-bg: #ffffff;
            --header-bg: #ffffff;
            --card-bg: #ffffff;
            --text-color: #212529;
            --text-muted-color: #6c757d;
            --border-color: #dee2e6;
        }

        body {
            background-color: var(--bg-color);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            font-size: 14px;
            color: var(--text-color);
        }

        .wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar */
        .sidebar {
            width: 260px;
            background-color: var(--sidebar-bg);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            z-index: 100;
            transition: all 0.3s;
        }

        .sidebar-header {
            padding: 1.5rem 1.5rem;
            display: flex;
            align-items: center;
        }
        
        .sidebar-header .logo-icon {
            font-size: 2rem;
            color: var(--primary-color);
            margin-right: 0.75rem;
            line-height: 1;
        }
        
        .sidebar-header .logo-text {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-color);
        }

        .sidebar-nav {
            flex-grow: 1;
            padding: 0 1rem;
        }

        .nav-item {
            margin-bottom: 0.5rem;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 0.75rem 1rem;
            color: var(--text-muted-color);
            border-radius: 0.5rem;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .nav-link:hover {
            background-color: var(--bg-color);
            color: var(--primary-color);
        }

        .nav-link.active {
            background-color: var(--primary-color);
            color: #fff;
            box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
        }
        
        .nav-link i {
            margin-right: 1rem;
            font-size: 1.1rem;
        }

        .sidebar-footer {
            padding: 1.5rem;
            border-top: 1px solid var(--border-color);
        }

        /* Main Content */
        .main-content {
            margin-left: 260px;
            width: calc(100% - 260px);
            display: flex;
            flex-direction: column;
        }

        .header {
            background-color: var(--header-bg);
            padding: 1rem 2rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header .form-control {
            max-width: 300px;
        }
        
        .header-actions {
            display: flex;
            align-items: center;
        }
        
        .header-actions .icon-btn {
            font-size: 1.25rem;
            color: var(--text-muted-color);
            margin-left: 1.5rem;
        }

        .content {
            padding: 2rem;
            flex-grow: 1;
        }

        .card {
            border: none;
            border-radius: 0.75rem;
            box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
            background-color: var(--card-bg);
        }

        .stat-card .card-body {
            display: flex;
            align-items: center;
        }
        
        .stat-card .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin-right: 1rem;
        }

        .module-card .card-body {
            text-align: center;
        }
        
        .module-card .module-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        
        .module-card .card-title {
            font-size: 1rem;
            font-weight: 600;
        }

        .table-custom {
            font-size: 13px;
        }
        
        .table-custom th {
            font-weight: 600;
            color: var(--text-muted-color);
            background-color: var(--bg-color);
        }
        
        .table-custom td {
            vertical-align: middle;
        }
        
        .badge {
            font-size: 11px;
            padding: 0.4em 0.7em;
            font-weight: 600;
        }

        @media (max-width: 992px) {
            .sidebar {
                left: -260px;
            }
            .main-content {
                margin-left: 0;
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <!-- Sidebar -->
        <nav class="sidebar">
            <div class="sidebar-header">
                <i class="bi bi-droplet-half logo-icon"></i>
                <a class="logo-text" href="#">源智库 SpringBase</a>
            </div>
            
            <ul class="nav flex-column sidebar-nav">
                <li class="nav-item">
                    <a class="nav-link active" href="#">
                        <i class="bi bi-grid-1x2-fill"></i>
                        <span>控制台</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/data-input">
                        <i class="bi bi-database-fill-add"></i>
                        <span>数据写入</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/knowledge-base">
                        <i class="bi bi-book-fill"></i>
                        <span>知识库</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/applications">
                        <i class="bi bi-app-indicator"></i>
                        <span>智能应用</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">
                        <i class="bi bi-bar-chart-line-fill"></i>
                        <span>分析报表</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">
                        <i class="bi bi-gear-fill"></i>
                        <span>系统设置</span>
                    </a>
                </li>
            </ul>

            <div class="sidebar-footer">
                <div class="card">
                    <div class="card-body text-center">
                        <h6 class="card-title">需要帮助？</h6>
                        <p class="card-text small text-muted">查看我们的帮助文档或联系技术支持</p>
                        <button class="btn btn-primary btn-sm">联系我们</button>
                    </div>
                </div>
            </div>
        </nav>

        <!-- Main Content -->
        <div class="main-content">
            <!-- Header -->
            <header class="header">
                <div class="input-group">
                    <span class="input-group-text bg-transparent border-end-0"><i class="bi bi-search"></i></span>
                    <input type="text" class="form-control border-start-0" placeholder="搜索文档、知识...">
                </div>
                
                <div class="header-actions">
                    <a href="#" class="icon-btn"><i class="bi bi-bell-fill"></i></a>
                    <a href="#" class="icon-btn"><i class="bi bi-question-circle-fill"></i></a>
                    <div class="dropdown">
                        <a href="#" class="d-flex align-items-center text-decoration-none dropdown-toggle ms-3" data-bs-toggle="dropdown">
                            <img src="https://i.pravatar.cc/40?u=admin" alt="Admin" width="40" height="40" class="rounded-circle">
                            <div class="ms-2">
                                <div class="fw-bold">企业管理员</div>
                                <small class="text-muted">Admin</small>
                            </div>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-end">
                            <li><a class="dropdown-item" href="#">个人资料</a></li>
                            <li><a class="dropdown-item" href="#">设置</a></li>
                            <li><hr class="dropdown-divider"></li>
                            <li><a class="dropdown-item" href="#">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </header>

            <!-- Content Area -->
            <main class="content">
                <div class="d-flex justify-content-between align-items-center mb-4">
                    <h2 class="mb-0 fw-bold">控制台</h2>
                    <button class="btn btn-primary">
                        <i class="bi bi-plus-circle me-1"></i> 创建新任务
                    </button>
                </div>

                <!-- Stat Cards -->
                <div class="row g-4 mb-4">
                    <div class="col-md-3">
                        <div class="card stat-card">
                            <div class="card-body">
                                <div class="stat-icon bg-primary text-white"><i class="bi bi-file-earmark-text-fill"></i></div>
                                <div>
                                    <h6 class="card-title text-muted fw-normal mb-1">总文档数</h6>
                                    <h4 class="mb-0 fw-bold">12,628</h4>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="card stat-card">
                            <div class="card-body">
                                <div class="stat-icon bg-success text-white"><i class="bi bi-check-circle-fill"></i></div>
                                <div>
                                    <h6 class="card-title text-muted fw-normal mb-1">今日处理</h6>
                                    <h4 class="mb-0 fw-bold">357</h4>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="card stat-card">
                            <div class="card-body">
                                <div class="stat-icon bg-warning text-white"><i class="bi bi-hourglass-split"></i></div>
                                <div>
                                    <h6 class="card-title text-muted fw-normal mb-1">队列中</h6>
                                    <h4 class="mb-0 fw-bold">12</h4>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="card stat-card">
                            <div class="card-body">
                                <div class="stat-icon bg-danger text-white"><i class="bi bi-exclamation-triangle-fill"></i></div>
                                <div>
                                    <h6 class="card-title text-muted fw-normal mb-1">处理失败</h6>
                                    <h4 class="mb-0 fw-bold">3</h4>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Main Section -->
                <div class="row g-4">
                    <div class="col-lg-8">
                        <div class="card h-100">
                            <div class="card-header d-flex justify-content-between align-items-center">
                                <h5 class="card-title mb-0">最近活动</h5>
                                <a href="#" class="btn btn-sm btn-outline-secondary">查看全部</a>
                            </div>
                            <div class="card-body p-0">
                                <div class="table-responsive">
                                    <table class="table table-hover table-custom mb-0">
                                        <thead>
                                            <tr>
                                                <th>文件/任务名称</th>
                                                <th>类型</th>
                                                <th>状态</th>
                                                <th>处理时间</th>
                                                <th>操作人</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td>2024年第一季度财务报告.pdf</td>
                                                <td>数据导入</td>
                                                <td><span class="badge bg-success-subtle text-success-emphasis">处理成功</span></td>
                                                <td>5分钟前</td>
                                                <td>张三</td>
                                            </tr>
                                            <tr>
                                                <td>生成产品发布会演讲稿</td>
                                                <td>智能应用</td>
                                                <td><span class="badge bg-primary-subtle text-primary-emphasis">生成中</span></td>
                                                <td>12分钟前</td>
                                                <td>李四</td>
                                            </tr>
                                            <tr>
                                                <td>API接口文档.docx</td>
                                                <td>知识库更新</td>
                                                <td><span class="badge bg-success-subtle text-success-emphasis">已入库</span></td>
                                                <td>1小时前</td>
                                                <td>王五</td>
                                            </tr>
                                            <tr>
                                                <td>市场调研报告_v3.pdf</td>
                                                <td>数据导入</td>
                                                <td><span class="badge bg-danger-subtle text-danger-emphasis">处理失败</span></td>
                                                <td>3小时前</td>
                                                <td>张三</td>
                                            </tr>
                                             <tr>
                                                <td>新员工入职培训手册</td>
                                                <td>智能应用</td>
                                                <td><span class="badge bg-success-subtle text-success-emphasis">生成完成</span></td>
                                                <td>昨天</td>
                                                <td>赵六</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-4">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="card-title mb-0">核心模块</h5>
                            </div>
                            <div class="card-body">
                                <div class="row text-center g-3">
                                    <div class="col-6">
                                        <a href="/data-input" class="text-decoration-none">
                                            <div class="card module-card h-100 p-3">
                                                <i class="bi bi-database-fill-add module-icon"></i>
                                                <div class="card-title">数据写入</div>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-6">
                                        <a href="/knowledge-base" class="text-decoration-none">
                                            <div class="card module-card h-100 p-3">
                                                <i class="bi bi-book-fill module-icon"></i>
                                                <div class="card-title">知识库</div>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-6">
                                        <a href="/applications" class="text-decoration-none">
                                            <div class="card module-card h-100 p-3">
                                                <i class="bi bi-app-indicator module-icon"></i>
                                                <div class="card-title">智能应用</div>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-6">
                                        <a href="#" class="text-decoration-none">
                                            <div class="card module-card h-100 p-3">
                                                <i class="bi bi-bar-chart-line-fill module-icon"></i>
                                                <div class="card-title">分析报表</div>
                                            </div>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</body>
</html> 